<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="/style/popup.css" rel="stylesheet" type="text/css" />
	<title></title>
</head>
<body>
	<ul id="main_menu">
		<li>
			<a href="#" id="validate">Validate Page</a>
		</li>
		<li>
			<a href="#" id="window_size">Window Size (<span id="currWinSize"></span>)</a>
		</li>
	</ul>
	<div id="results"></div>
<script type="text/javascript">
document.getElementById("validate").addEventListener("click", function () {
	chrome.tabs.getSelected(null, function (currTab) {
		chrome.tabs.sendRequest(currTab["id"], {"type":"validate"});
	});
	return false;
}, false);

//document.getElementById("window_size").addEventListener("click", function () {
(function () {
	var winSize = document.getElementById("currWinSize");
	chrome.tabs.getSelected(null, function (currTab) {
		chrome.extension.sendRequest({"action":"window_size"}, function (response) {
			winSize.innerHTML = response["width"] + " x " + response["height"];
		});
	});
})();
//	return false;
//}, false);
</script>
</body>
</html>